﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

using SmlEngine;
using SmlEngine.Sprites;

namespace SmlEngine.Sprites
{
    /// <summary>
    /// Defines a drawable object with a position, size, and other data.
    /// </summary>
    public interface IGameObject
    {
        /// <summary>
        /// The visibility state of this sprite.
        /// </summary>
        Visibility Visibility { get; set; } // how is this legal
        /// <summary>
        /// The position of the top-left corner of the hitbox of this object.
        /// </summary>
        Vector2 Position { get; set; }
        /// <summary>
        /// The size of the hitbox of this object.
        /// </summary>
        Vector2 Size { get; set; }
        /// <summary>
        /// The area of the hitbox of this object, calculated from the position and size.
        /// </summary>
        Rectangle Area { get; }

        /// <summary>
        /// Loads the content for this object.
        /// </summary>
        /// <param name="Content">The ContentManager to use for resources in the pipeline.</param>
        /// <param name="Graphics">A GraphicsDevice required for loading external content.</param>
        void LoadContent(ContentManager Content, GraphicsDevice Graphics);
        /// <summary>
        /// Unloads the content for this object.
        /// </summary>
        void UnloadContent();
        /// <summary>
        /// Initializes this object.
        /// </summary>
        void Initialize();
        /// <summary>
        /// Updates this object.  Use to handle movement and collision response.
        /// </summary>
        /// <param name="gameTime">Timing information for this game.</param>
        void Update(GameTime gameTime);
        /// <summary>
        /// Draws this object to the given SpriteBatch.
        /// </summary>
        /// <param name="gameTime">Timing information for this game.</param>
        /// <param name="spriteBatch">The SpriteBatch to draw onto.</param>
        void Draw(GameTime gameTime, SpriteBatch spriteBatch);
    }
}
